import { EntityPartType, EntityInfo } from '@amcax/web-render';

export enum PickMode {
  BottomPick = 'BottomPick', // 底部工具栏拾取
  CmdPick = 'CmdPick', // 命令拾取
}
export enum SelectType {
  ENT = 'entities', // 实体
  ANGLE = 'angle', // 角度
  RANGE = 'range', // 范围
  TOOL = 'tool', // 工具
}
export enum EntOtpMod {
  HOVER = 'setEntityHovered',
  SELECTED = 'setEntitySelected',
}
export type HandleType = {
  ents: EntityInfo[]; // 实体
  state: boolean; // 状态 选中 还是 取消选中
  key: EntOtpMod; // 操作类型
  shift: boolean; // 是否按下shift
};
export enum EType {
  itself = 'itself', // 选择实体
  fromPoint = 'fromPoint', // 根据某个类型获取实体
}
export enum TabsType {
  Geometry = 'Geometry', // 几何
  Element = 'ELEMENT', // 网格
}

export type PickStatus = 'cmd' | 'pick' | 'focus'; // pick 底部工具pick  cmd 命令的pick

export const OrtherKey = {
  PICK: 'pick_ents',
  TEMP: 'temp_ents',
  FOCUS: 'focus_ents',
};

export const EntsTEmp = {
  SOLID: new Array<number>(),
  FACE: new Array<number>(),
  LINE: new Array<number>(),
  POINT: new Array<number>(),
  LINES3D: new Array<number>(),
  POINTS3D: new Array<number>(),
};

export type FormatType = {
  multiple?: boolean;
  entityPartType?: EntityPartType;
  title?: string;
  const?: string;
};
export const ColorMap = {
  [EntityPartType.point]: [0xda5583, 0x2590f1, 0xf48cc, 0xf85149],
  [EntityPartType.line]: [0xc026d3, 0x2555c6, 0xf48cc, 0xf85149],
  [EntityPartType.face]: [0xe6708c, 0x2c5bc9, 0xf48cc, 0xf85149],
};
